package cn.hzxs.zjn.studentmanagement.sevice.serviceImpl;

import cn.hzxs.zjn.studentmanagement.dao.TaskMapper;
import cn.hzxs.zjn.studentmanagement.domain.Page;
import cn.hzxs.zjn.studentmanagement.domain.Task;
import cn.hzxs.zjn.studentmanagement.domain.User;
import cn.hzxs.zjn.studentmanagement.sevice.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: Zjn *Bring it on!!!*
 * @Date: 2021/3/28 14:01
 * Note:
 */
@Service("TaskService")
public class TaskServiceImpl implements TaskService {
    @Autowired
    TaskMapper taskMapper;

    @Override
    public List<Task> getTask(Page page) {
        return taskMapper.getTask(page);
    }

    @Override
    public List<Map> getUserByTask(Integer taskid) {
        return taskMapper.getUserByTask(taskid);
    }

    @Override
    public void deleteTask(Task task) {
        taskMapper.deleteTask(task);
    }

    @Override
    public void updateTask(Task task) {
        taskMapper.updateTask(task);
    }

    @Override
    public Integer selectTaskIdBy(Task task) {
        return taskMapper.selectTaskIdBy(task);
    }

    @Override
    public boolean ifExistTitle(Task task) {
        return taskMapper.ifExistTitle(task);
    }

    @Override
    public void addTask(Task task) {
        taskMapper.addTask(task);
    }

    @Override
    public void insertPeopleByTask(Task task, Integer userId) {
        taskMapper.insertPeopleByTask(task,userId);
    }
}
